<%--
    Document   : index
    Created on : Jan 12, 2012, 8:25:21 PM
    Author     : NDC
--%>
<%@page import="org.apache.jasper.tagplugins.jstl.core.Param"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Cooking Website</title>
        <script language="javascript">
            function confirmDelete(act, id){
                if (confirm("Are you sure to delete this "+ act +" ?")){
                    location.href="service?act="+act+"&do=delete&id=" + id;
                }
            }
            function confirmRemove(menuId, foodId){
                if (confirm("Are you sure to remove this food ?")){
                    location.href="service?act=menu&do=remove&mid=" + menuId +"&fid="+foodId;
                }
            }
        </script>
    </head>
    <body>
        <%@include file="jsp/menu_top.jsp" %>
        <c:if test="${param.style == null || param.style == ''}">
            <%@include file="jsp/homepage.jsp" %>
        </c:if>
        <c:if test="${param.style != null && param.style != ''}">
            <c:if test="${param.style == 'login'}">
                <%@include file="jsp/login.jsp" %>
            </c:if>
            <c:if test="${not empty sessionScope.user}">
                <c:if test="${param.act == 'food'}">
                    <c:if test="${param.style == 'management'}">
                        <%@include file="jsp/management_food.jsp" %>
                    </c:if>
                    <c:if test="${param.style == 'add'}">
                        <%@include file="jsp/management_food_add.jsp" %>
                    </c:if>
                    <c:if test="${param.style == 'detail'}">
                        <%@include file="jsp/management_food_detail.jsp" %>
                    </c:if>
                </c:if>
                <c:if test="${param.act == 'menu'}">
                    <c:if test="${param.style == 'management'}">
                        <%@include file="jsp/management_menu.jsp" %>
                    </c:if>
                    <c:if test="${param.style == 'add'}">
                        <%@include file="jsp/management_menu_add.jsp" %>
                    </c:if>
                    <c:if test="${param.style == 'detail'}">
                        <%@include file="jsp/management_menu_detail.jsp" %>
                    </c:if>
                </c:if>
            </c:if>
        </c:if>
    </body>
</html>
